<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Random Background Color Animation</title>
  <link rel="stylesheet" href="style.css">
</head>

<body>
  <div class="box">
    <div class="circle"></div>
  </div>
</body>
<script>
  function changeBg() {
    let r = Math.floor(Math.random() * 255)
    let g = Math.floor(Math.random() * 255)
    let b = Math.floor(Math.random() * 255)

    document.body.style.backgroundColor = `rgba(${r}, ${g}, ${b})`
  }

  setInterval(() => {
    changeBg()
  }, 4000);
</script>

</html>